import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
let routes = [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('@/views/index.vue')
    },
    {
        path: '/Category',
        name: 'Category',
        component: () => import('@/views/Category/index.vue')
    },
    {
        path: '/detail/:id',
        name: 'detail',
        component: () => import('@/views/Category/detail.vue')
    },
    {
        path: '/Agent',
        name: 'Agent',
        component: () => import('@/views/Agent/index.vue')
    },
    {
        path: '/About',
        name: 'About',
        component: () => import('@/views/About/index.vue')
    },
    {
        path: '*',
        component: () => import('@/views/404.vue')
    }
]




let router = new VueRouter({
    routes,
    // mode: 'history'
})



export default router